import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import LayoutPage from '@/layout/index.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'LayoutPage',
    component: LayoutPage,
    children: [
      {
        path: '/',
        name: 'HomePage',
        component: () => import('@/views/home/index.vue')
      },
      {
        path: '/login',
        name: 'LoginPage',
        component: () => import('@/views/login/index.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
